Graphical representations of data can greatly facilitate analysis and understanding of the data. Different types of charts (or graphs), such as a bar chart, an area chart, a pie chart, a line chart, a column graph, a scatter plot, and so forth, may be generated from the data set to suit different needs. Such visualizations are instrumental in facilitating the understanding of complex business data sets.
A developer may use chart (or charting) libraries to add web-based visualization support to web applications. A chart library typically provides commands that are used to render a visualization. It may include a library of predefined chart components (e.g., legends, axes, titles, tooltip, plot area, etc.) that may be used as building blocks for a new visualization. Different charts may share several common chart parts. For instance, a bar chart and a line chart may share the same legend, while a multi-bar chart can share the same plot area as a single bar chart.
However, one of the problems with conventional chart libraries is that although different charts may share common chart parts, such chart parts are not easily reusable. To generate a new visualization, all the different chart parts have to be redefined from the code level. In addition, each customer may have different requirements. For example, a customer may require a pie chart to have two titles (e.g., main title and sub title) or a bar chart to have a value axis on the top. However, chart libraries typically only support pre-defined charts, and customers are not able to customize or extend the charts by themselves. Therefore, if the chart library only provides a default pie chart with one title or a default bar chart with a value axis at the bottom, such charts cannot be generated unless the chart library is customized to accommodate such specific requirements.
Therefore, there is a need for an improved framework that addresses the above-mentioned challenges.